package com.spbdx.common.annotation;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spbdx.common.sensitive.SensitiveJsonSerializer;
import com.spbdx.common.sensitive.SensitiveType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Description TODO
 *
 * @author chenwei
 * @version 1.0
 * @date 2023/4/14 8:35
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveJsonSerializer.class) // 对标注注解的字段采用哪种序列化器进行序列化
public @interface SensitiveAnno {

    // 脱敏策略
    SensitiveType value();

}
